//
//  DateSelectCell.m
//  CenturyCity
//
//  Created by beisheng03 on 2018/1/17.
//  Copyright © 2018年 beisheng. All rights reserved.
//

#import "DateSelectCell.h"

@interface DateSelectCell ()
@property (weak, nonatomic) IBOutlet UIImageView *leftImageView;
@property (weak, nonatomic) IBOutlet UILabel *leftLabel;
@property (weak, nonatomic) IBOutlet UILabel *rightLabel;

@end

@implementation DateSelectCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.leftLabel.font = MYFONT(16);
    self.rightLabel.font = [UIFont boldSystemFontOfSize:17];
    

    // Initialization code
}


- (void)setIndex:(NSIndexPath *)index{
    _index = index;
    
    if (_index.row == 0) {
         self.leftLabel.text = @"所属供应商 :";
        self.rightLabel.text = @"";
        self.leftImageView.image = [UIImage imageNamed:@"payMoney_003"];
    
    } else {
        self.leftLabel.text = @"截止日期 :";
        self.rightLabel.text = @"Due Date";
        self.leftImageView.image = [UIImage imageNamed:@"dateImage"];

//        self.rightLabel.text = @"Due Date";

    }
    
    
}

- (void)setModel:(GetMoneyInfoModel *)model{
    _model = model;
    
    if (self.index.row == 0) {
        
        if (_model.dateStr.length > 0) {
            self.rightLabel.text = _model.dateStr;
            self.rightLabel.textColor = [UIColor blackColor];
            
        }else{
            
            self.rightLabel.textColor = placeholderColor;
            
        }
        
    } else {
       
        
        if (_model.dateStr.length > 0) {
            self.rightLabel.text = _model.dateStr;
            self.rightLabel.textColor = [UIColor blackColor];
            
        }else{
            
            self.rightLabel.textColor = placeholderColor;
            
        }
    }
    
    
    
    
    
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
